import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

//const home = () => import('@/views/home/home.vue')
const game = () => import('@/views/game/game.vue')
const list = () => import('@/views/list/list.vue')
const gift = () => import('@/views/gift/gift.vue')
const plan = () => import('@/views/plan/plan.vue')
const news = () => import('@/views/news/news.vue')
const pay = () => import('@/views/pay/pay.vue')
const about = () => import('@/views/about/about.vue')
const consociation = () => import('@/views/consociation/consociation.vue')
const detailsGame = () => import('@/views/details/game.vue')
const detailsGift = () => import('@/views/details/gift.vue')
const detailsBill = () => import('@/views/details/bill.vue')
const userCenter = () => import('@/views/user/center.vue')
const text = () => import('@/views/text/text.vue')
const replace = () => import('@/views/replace/index.vue')
export function createRouter() {
  return new Router({
    mode: 'history',
    fallback: false,
    scrollBehavior: () => ({ y: 0 }),
    routes: [
      { 
        path: '/', 
        component: () => import('@/views/index/index.vue') 
      },
      { path: '/game', component: game },
      { path: '/list', component: list },
      { path: '/gift', component: gift },
      { path: '/plan', component: plan },
      { path: '/news', component: news },
      { path: '/pay', component: pay },
      { path: '/about', component: about },
      { path: '/consociation', component: consociation },
      { path: '/details/game', component: detailsGame },
      { path: '/details/gift', component: detailsGift },
      { path: '/details/bill', component: detailsBill },
      { path: '/user/center', component: userCenter },
      { path: '/text', component: text },
      { path: '/replace', component: replace },
    ]
  })
}